<% unless @activities.size > 0 %>
	
	<div class="alert green center">
		<h1><%= link_to "Create a new milestone", new_project_activity_path(@project) %></h1>
		<p>Não há nenhuma atividade cadastrada ainda, crie uma agora mesmo!</p>
	</div>
	
<% else %>

<table class="basic-table fluid gray-line">
	<thead>
		<tr>
			<th class="header-left top-left-rounded-8" style="width: 50px">State</th>
			<th class="left">Title</th>
			<th>Milestone</th>
			<th>Responsible</th>
			<th class="top-right-rounded-8" style="width: 150px" class="header-right">Age</th>
		</tr>
	</thead>
	<tbody>
	<% for activity in @activities %>
		<tr class="<%= cycle("even", "odd") %>">
			<td><%= status_for activity %></td>
			<td class="left"><%= link_to activity.title, project_activity_path(@project, activity) %></td>
			<td><%= link_to activity.milestone.title, project_milestone_path(@project, activity.milestone) unless activity.milestone.nil? %></td>
			<td><%= activity.responsible.email unless activity.responsible.nil? %></td>
			<td><%= time_ago_in_words activity.created_at %></td>
		</tr>
	<% end %>
	</tbody>
</table>

<% end %>

<% content_for(:subtabs) do %>
	<%= render 'activities/navigation/index_subtabs' %>
<% end %>

<% content_for :sidebar do %>
	<p class="center"><%= link_to t(:create_new, :scope => :activity), new_project_activity_path, :class => 'awesome large', :style => 'font-size: 18px' %></p>
	
	<p class="title lightest rounded-4"><%= t :filter, :count => 2 %></p>
	
	<p>
		<a href="<%= project_activities_path(@project) %>">
			<span class="center mini-alert light-blue rounded-4"><%= @completed.size %></span>
			Completed
		</a>
	</p>
	<p><span class="center mini-alert light-blue rounded-4"><%= @recent.size %></span>Recentes</p>
	<p><span class="center mini-alert light-blue rounded-4"><%= @open.size %></span>Abertas</p>
<% end %>